package com.wocao.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wocao.entity.ZyUnit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 单元  Mapper 接口
 *
 * @since 2023-12-02
 */
@Mapper
public interface ZyUnitMapper extends BaseMapper<ZyUnit> {

    //查询所有
    Page<ZyUnit> selectUnitAll(Page page,@Param("unitName") String unitName,@Param("unitCode") String unitCode,
                               @Param("unitHaveElevator") String unitHaveElevator,@Param("buildingId") String buildingId,@Param("comId") String comId);

    //通过id查询小区
    ZyUnit selectUnityById(@Param("unitId") String unitId);

    /**
     * 根据id查询单元名称
     * @param unitId unitId
     */
    void selectNameById(String unitId);
}
